function delRoleDialog(
    {
        roleId,
        title = "",
        callback = Function()
    }
) {
    if (!roleId) {
        return $.toast("角色ID不能为空");
    }

    const $dialogWidget = $.dialog(
        title ? "是否确定删除角色(" + title + ")" : "是否确定删除该角色",
        {
            title:"删除角色",
            width: "300px",
            ok() {
                delRole({
                    roleId
                }, res => {
                    if (res.Code !== 10000) {
                        return $.toast(res.Message);
                    }

                    $dialogWidget.remove();
                    $.toast("删除成功");
                    callback();
                })
            }
        }
    )

    function delRole(param, callback = Function()) {
        return $.sApi({
            data: param,
            url: "/api/Role/delRole",
        }, callback)
    }
}